package com.liuyingxing.javaSpringCloudAccount.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.liuyingxing.entity.account.User;
import com.liuyingxing.entity.common.Result;
import com.liuyingxing.entity.common.SearchBean;
import com.liuyingxing.javaSpringCloudAccount.entity.UserVo;

/**
 * Created by IntelliJ IDEA.
 * @File UserService.java
 * @Auth liuxing
 * @Date 2021/8/22 10:36
 * @Email liuxing997@foxmail.com
 */
public interface UserService {

	//根据用户名和密码查询用户信息
	User getUserByUserNameAndPassword(String userName, String password);

	//用户登录
	Result<User> login(User user);

	//用户登出
	void logout();

	//添加用户信息
	Result<User> insertUser(User user);

	//更新用户信息
	Result<User> updateUser(User user);

	//根据ID获取用户信息
	User getUserById(int id);

	//删除用户信息
	Result<Object> deleteUserById(int id);

	//分页查询用户信息
	PageInfo<User> getUsersBySearchBean(SearchBean searchBean);

	//根据用户名查询用户信息
	User getUserByUserName(String userName);

	//根据关键字查询用户信息
	List<User> getUsersByKeyWord(String keyWord);

	//根据ID获取用户信息（包括城市信息）
	UserVo getUserVoById(int id);
}
